﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace System
{
    public static class bytearray_ext
    {
        public static MemoryStream ToStream(this byte[] buffer)
        {
            return new MemoryStream(buffer);
        }

        public static byte[] ToByteArray(this string str)
        {
            return System.Text.Encoding.ASCII.GetBytes(str);
        }
    }
}
